﻿@using Microsoft.AspNetCore.Mvc.Localization
@model ChargePointViewModel
@inject IViewLocalizer Localizer
@{
    ViewData["Title"] = @Localizer["Title"];
}
<br />

@if (Model != null)
{
    <table id="dtChargeTags" class="table table-striped table-bordered table-sm table-hover" cellspacing="0" width="100%">
        <thead>
            <tr>
                <th class="th-sm">@Localizer["ChargePointId"]</th>
                <th class="th-sm">@Localizer["Name"]</th>
                <th class="th-sm">@Localizer["Comment"]</th>
            </tr>
        </thead>
        <tbody>
            @if (Model.ChargePoints != null)
            {
                foreach (ChargePoint cp in Model.ChargePoints)
                {
                    <tr class="table-row" data-href='@Url.Action("ChargePoint", Constants.HomeController, new { id = cp.ChargePointId })'>
                        <td>@cp.ChargePointId</td>
                        <td>@cp.Name</td>
                        <td>@cp.Comment</td>
                    </tr>
                }
            }
        </tbody>
    </table>

    <br />
    <a class="btn btn-secondary" href="~/Home/ChargePoint/@@">@Localizer["AddNew"]</a>
}

